/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package czStvDpds.graphics3D.gui;

/**
 *
 * @author Ondra
 */
public class ComponentPixelSize {
    private int heightPx, widthPx;

    public ComponentPixelSize(int height, int width) {
        this.heightPx = height;
        this.widthPx = width;
    }

    public int getHeight() {
        return heightPx;
    }

    public void setHeight(int height) {
        this.heightPx = height;
    }

    public int getWidth() {
        return widthPx;
    }

    public void setWidth(int width) {
        this.widthPx = width;
    }
    
    public ComponentPixelSize max(ComponentPixelSize size2){
        int height = Math.max(heightPx, size2.getHeight());
        int width = Math.max(widthPx, size2.getWidth());
        return new ComponentPixelSize(height, width);
    }

    public boolean equals(ComponentPixelSize size2) {
        return heightPx == size2.getHeight() && widthPx == size2.getWidth();
    }
    
    
}
